<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>函数</title>
    <script>
        //声明函数
        function sayHello() {
            console.log("你好啊！togogo")
        }
        //调用函数
        sayHello()
    </script>
    <script>
        //带有参数
        function showArgs(name) {
            console.log("我的名字是:" + name)
        }
        showArgs("钱多多");
        //带多个参数
        function showMsg(name,age) {
            console.log(name+ ", " + age)
        }
        showMsg("钱好多",18)
    </script>
</head>
<body>

</body>
</html>